home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5243 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  1.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news text default
99% file C source text default
98% file C source, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 43 41 | 52 4e 65 74 2e 68 72 21 |Path: CA|RNet.hr!|
|00000010| 66 6c 79 21 6d 61 76 65 | 72 69 63 6b 0a 46 72 6f |fly!mave|rick.Fro|
|00000020| 6d 3a 20 6d 61 76 65 72 | 69 63 6b 40 66 6c 79 2e |m: maver|ick@fly.|
|00000030| 63 63 2e 66 65 72 2e 68 | 72 20 28 5a 6c 61 74 6b |cc.fer.h|r (Zlatk|
|00000040| 6f 20 43 61 6c 75 73 69 | 63 29 0a 4e 65 77 73 67 |o Calusi|c).Newsg|
|00000050| 72 6f 75 70 73 3a 20 63 | 6f 6d 70 2e 6c 61 6e 67 |roups: c|omp.lang|
|00000060| 2e 63 0a 53 75 62 6a 65 | 63 74 3a 20 52 65 3a 20 |.c.Subje|ct: Re: |
|00000070| 52 61 6e 64 6f 6d 20 4e | 75 6d 62 65 72 73 20 48 |Random N|umbers H|
|00000080| 65 6c 70 20 4e 65 65 64 | 65 64 0a 44 61 74 65 3a |elp Need|ed.Date:|
|00000090| 20 39 20 46 65 62 20 31 | 39 39 36 20 30 34 3a 35 | 9 Feb 1|996 04:5|
|000000a0| 38 3a 35 37 20 47 4d 54 | 0a 4f 72 67 61 6e 69 7a |8:57 GMT|.Organiz|
|000000b0| 61 74 69 6f 6e 3a 20 46 | 45 52 2c 20 55 6e 69 76 |ation: F|ER, Univ|
|000000c0| 65 72 73 69 74 79 20 6f | 66 20 5a 61 67 72 65 62 |ersity o|f Zagreb|
|000000d0| 2c 20 43 72 6f 61 74 69 | 61 0a 44 69 73 74 72 69 |, Croati|a.Distri|
|000000e0| 62 75 74 69 6f 6e 3a 20 | 77 6f 72 6c 64 0a 4d 65 |bution: |world.Me|
|000000f0| 73 73 61 67 65 2d 49 44 | 3a 20 3c 34 66 65 6b 61 |ssage-ID|: <4feka|
|00000100| 68 24 72 36 6f 40 62 61 | 67 61 6e 2e 73 72 63 65 |h$r6o@ba|gan.srce|
|00000110| 2e 68 72 3e 0a 52 65 66 | 65 72 65 6e 63 65 73 3a |.hr>.Ref|erences:|
|00000120| 20 3c 34 66 61 63 73 64 | 24 6c 63 68 40 62 61 67 | <4facsd|$lch@bag|
|00000130| 61 6e 2e 73 72 63 65 2e | 68 72 3e 0a 52 65 70 6c |an.srce.|hr>.Repl|
|00000140| 79 2d 54 6f 3a 20 6d 61 | 76 65 72 69 63 6b 40 66 |y-To: ma|verick@f|
|00000150| 6c 79 2e 63 63 2e 65 74 | 66 2e 68 72 0a 4e 4e 54 |ly.cc.et|f.hr.NNT|
|00000160| 50 2d 50 6f 73 74 69 6e | 67 2d 48 6f 73 74 3a 20 |P-Postin|g-Host: |
|00000170| 66 6c 79 2e 63 63 2e 65 | 74 66 2e 68 72 0a 4d 69 |fly.cc.e|tf.hr.Mi|
|00000180| 6d 65 2d 56 65 72 73 69 | 6f 6e 3a 20 31 2e 30 0a |me-Versi|on: 1.0.|
|00000190| 43 6f 6e 74 65 6e 74 2d | 54 79 70 65 3a 20 74 65 |Content-|Type: te|
|000001a0| 78 74 2f 70 6c 61 69 6e | 3b 20 63 68 61 72 73 65 |xt/plain|; charse|
|000001b0| 74 3d 55 53 2d 41 53 43 | 49 49 0a 43 6f 6e 74 65 |t=US-ASC|II.Conte|
|000001c0| 6e 74 2d 54 72 61 6e 73 | 66 65 72 2d 45 6e 63 6f |nt-Trans|fer-Enco|
|000001d0| 64 69 6e 67 3a 20 37 62 | 69 74 0a 58 2d 4e 65 77 |ding: 7b|it.X-New|
|000001e0| 73 72 65 61 64 65 72 3a | 20 54 49 4e 20 5b 76 65 |sreader:| TIN [ve|
|000001f0| 72 73 69 6f 6e 20 31 2e | 32 20 50 4c 32 5d 0a 0a |rsion 1.|2 PL2]..|
|00000200| 6f 6c 69 76 65 72 2d 6d | 61 72 69 6e 20 76 69 64 |oliver-m|arin vid|
|00000210| 6f 76 69 63 20 28 6f 76 | 33 30 38 30 31 40 74 69 |ovic (ov|30801@ti|
|00000220| 6c 69 61 2e 63 63 2e 66 | 65 72 2e 68 72 29 20 77 |lia.cc.f|er.hr) w|
|00000230| 72 6f 74 65 3a 0a 0a 3e | 20 20 48 69 21 20 49 20 |rote:..>| Hi! I |
|00000240| 68 61 76 65 20 61 20 70 | 72 6f 62 6c 65 6d 20 69 |have a p|roblem i|
|00000250| 6e 76 6f 6c 76 69 6e 67 | 20 72 61 6e 64 6f 6d 20 |nvolving| random |
|00000260| 6e 75 6d 62 65 72 20 67 | 65 6e 65 72 61 74 6f 72 |number g|enerator|
|00000270| 2e 0a 3e 20 20 49 6e 20 | 6d 79 20 70 72 6f 67 72 |..> In |my progr|
|00000280| 61 6d 20 49 20 6e 65 65 | 64 20 61 20 6c 69 73 74 |am I nee|d a list|
|00000290| 20 6f 66 20 72 61 6e 64 | 6f 6d 20 6e 75 6d 62 65 | of rand|om numbe|
|000002a0| 72 73 2c 20 62 75 74 20 | 49 20 64 6f 6e 27 74 20 |rs, but |I don't |
|000002b0| 77 61 6e 74 0a 3e 20 74 | 68 65 6d 20 74 6f 20 62 |want.> t|hem to b|
|000002c0| 65 20 74 68 65 20 73 61 | 6d 65 20 65 76 65 72 79 |e the sa|me every|
|000002d0| 20 74 69 6d 65 20 49 20 | 73 74 61 72 74 20 74 68 | time I |start th|
|000002e0| 65 20 70 72 6f 67 72 61 | 6d 2e 20 4e 6f 77 2c 20 |e progra|m. Now, |
|000002f0| 49 20 6b 6e 6f 77 20 49 | 0a 3e 20 68 61 76 65 20 |I know I|.> have |
|00000300| 74 6f 20 63 68 61 6e 67 | 65 20 74 68 65 20 73 65 |to chang|e the se|
|00000310| 65 64 20 62 79 20 73 72 | 61 6e 64 20 66 75 6e 63 |ed by sr|and func|
|00000320| 74 69 6f 6e 2c 20 62 75 | 74 20 69 66 20 49 20 70 |tion, bu|t if I p|
|00000330| 75 74 20 74 68 65 20 61 | 72 67 75 6d 65 6e 74 20 |ut the a|rgument |
|00000340| 0a 3e 20 74 6f 20 62 65 | 20 63 6f 6e 73 74 61 6e |.> to be| constan|
|00000350| 74 2c 20 74 68 65 6e 20 | 73 72 61 6e 64 20 69 73 |t, then |srand is|
|00000360| 20 6f 66 20 6e 6f 20 75 | 73 65 2e 20 54 68 65 72 | of no u|se. Ther|
|00000370| 65 66 6f 72 65 2c 20 69 | 20 63 61 6d 65 20 74 6f |efore, i| came to|
|00000380| 20 63 6f 6e 63 6c 75 73 | 69 6f 6e 0a 3e 20 74 68 | conclus|ion.> th|
|00000390| 61 74 20 69 20 68 61 76 | 65 20 74 6f 20 6d 61 6b |at i hav|e to mak|
|000003a0| 65 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 20 6f |e the ar|gument o|
|000003b0| 66 20 73 72 61 6e 64 20 | 65 76 65 72 79 20 74 69 |f srand |every ti|
|000003c0| 6d 65 20 64 69 66 66 65 | 72 65 6e 74 2e 20 0a 3e |me diffe|rent. .>|
|000003d0| 20 20 53 6f 2c 20 6d 79 | 20 69 64 65 61 20 77 61 | So, my| idea wa|
|000003e0| 73 20 74 6f 20 75 73 65 | 20 74 68 65 20 63 6f 6d |s to use| the com|
|000003f0| 70 75 74 65 72 20 63 6c | 6f 63 6b 20 73 6f 6d 65 |puter cl|ock some|
|00000400| 68 6f 77 2c 20 61 6e 64 | 20 74 6f 20 74 61 6b 65 |how, and| to take|
|00000410| 0a 3e 20 74 69 6d 65 20 | 61 73 20 74 68 65 20 73 |.> time |as the s|
|00000420| 65 65 64 2c 20 73 69 6e | 63 65 20 74 68 61 74 20 |eed, sin|ce that |
|00000430| 63 61 6e 20 68 61 72 64 | 6c 79 20 62 65 20 74 68 |can hard|ly be th|
|00000440| 65 20 73 61 6d 65 20 65 | 76 65 72 79 20 74 69 6d |e same e|very tim|
|00000450| 65 20 49 0a 3e 20 73 74 | 61 72 74 20 74 68 65 20 |e I.> st|art the |
|00000460| 70 72 6f 67 72 61 6d 2e | 20 42 75 74 2c 20 74 68 |program.| But, th|
|00000470| 65 72 65 20 69 73 20 73 | 6f 6d 65 74 68 69 6e 67 |ere is s|omething|
|00000480| 20 77 72 6f 6e 67 20 77 | 68 65 6e 20 49 20 74 72 | wrong w|hen I tr|
|00000490| 79 20 74 6f 20 6d 61 6b | 65 0a 3e 20 73 6f 6d 65 |y to mak|e.> some|
|000004a0| 74 68 69 6e 67 20 77 69 | 74 68 20 66 75 6e 63 74 |thing wi|th funct|
|000004b0| 69 6f 6e 73 20 66 72 6f | 6d 20 74 69 6d 65 2e 68 |ions fro|m time.h|
|000004c0| 2e 0a 3e 20 28 6d 61 79 | 62 65 20 49 20 64 6f 6e |..> (may|be I don|
|000004d0| 27 74 20 75 73 65 20 74 | 68 65 6d 20 69 6e 20 72 |'t use t|hem in r|
|000004e0| 69 67 68 74 20 77 61 79 | 2c 20 6f 72 20 6d 61 79 |ight way|, or may|
|000004f0| 62 65 20 74 68 65 20 77 | 68 6f 6c 65 20 69 64 65 |be the w|hole ide|
|00000500| 61 20 69 73 20 77 72 6f | 6e 67 29 0a 0a 3e 20 49 |a is wro|ng)..> I|
|00000510| 73 20 74 68 65 72 65 20 | 73 6f 6d 65 6f 6e 65 20 |s there |someone |
|00000520| 77 68 6f 20 63 61 6e 20 | 68 65 6c 70 20 6d 65 3f |who can |help me?|
|00000530| 21 0a 3e 20 54 68 61 6e | 6b 73 2e 0a 0a 49 64 65 |!.> Than|ks...Ide|
|00000540| 61 20 69 73 20 67 6f 6f | 64 2e 20 54 72 79 20 74 |a is goo|d. Try t|
|00000550| 68 69 73 3a 0a 0a 0a 23 | 69 6e 63 6c 75 64 65 20 |his:...#|include |
|00000560| 3c 73 74 64 69 6f 2e 68 | 3e 0a 23 69 6e 63 6c 75 |<stdio.h|>.#inclu|
|00000570| 64 65 20 3c 74 69 6d 65 | 2e 68 3e 0a 23 69 6e 63 |de <time|.h>.#inc|
|00000580| 6c 75 64 65 20 3c 75 6e | 69 73 74 64 2e 68 3e 0a |lude <un|istd.h>.|
|00000590| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 6c 69 62 |#include| <stdlib|
|000005a0| 2e 68 3e 0a 0a 69 6e 74 | 20 6d 61 69 6e 28 76 6f |.h>..int| main(vo|
|000005b0| 69 64 29 0a 7b 0a 09 73 | 72 61 6e 64 28 74 69 6d |id).{..s|rand(tim|
|000005c0| 65 28 4e 55 4c 4c 29 29 | 3b 0a 09 70 72 69 6e 74 |e(NULL))|;..print|
|000005d0| 66 28 22 25 64 5c 6e 22 | 2c 20 72 61 6e 64 28 29 |f("%d\n"|, rand()|
|000005e0| 29 3b 0a 09 65 78 69 74 | 28 30 29 3b 0a 7d 0a 0a |);..exit|(0);.}..|
|000005f0| 0a 2d 2d 0a 20 5f 5f 5f | 5f 5f 5f 5f 5f 5f 5f 0a |.--. ___|_______.|
|00000600| 2f 5c 20 20 5f 5f 5f 5f | 5f 5f 5f 5c 20 20 20 50 |/\ ____|___\ P|
|00000610| 6f 73 74 65 64 20 62 79 | 20 5a 6c 61 74 6b 6f 20 |osted by| Zlatko |
|00000620| 43 61 6c 75 73 69 63 0a | 5c 20 5c 20 5c 5f 5f 5f |Calusic.|\ \ \___|
|00000630| 5f 20 20 2f 20 20 45 2d | 6d 61 69 6c 3a 20 6d 61 |_ / E-|mail: ma|
|00000640| 76 65 72 69 63 6b 40 66 | 6c 79 2e 63 63 2e 66 65 |verick@f|ly.cc.fe|
|00000650| 72 2e 68 72 0a 20 5c 20 | 5c 20 5c 2f 20 2f 20 2f |r.hr. \ |\ \/ / /|
|00000660| 20 20 55 52 4c 3a 20 68 | 74 74 70 3a 2f 2f 66 6c | URL: h|ttp://fl|
|00000670| 79 2e 63 63 2e 66 65 72 | 2e 68 72 2f 7e 6d 61 76 |y.cc.fer|.hr/~mav|
|00000680| 65 72 69 63 6b 2f 0a 20 | 20 5c 20 5c 2f 20 2f 20 |erick/. | \ \/ / |
|00000690| 2f 20 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |/ -----|--------|
|000006a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000006d0| 2d 2d 0a 20 20 20 5c 20 | 20 2f 20 2f 20 20 20 46 |--. \ | / / F|
|000006e0| 61 63 75 6c 74 79 20 6f | 66 20 45 6c 65 63 74 72 |aculty o|f Electr|
|000006f0| 69 63 61 6c 20 45 6e 67 | 69 6e 65 65 72 69 6e 67 |ical Eng|ineering|
|00000700| 20 61 6e 64 20 43 6f 6d | 70 75 74 65 72 20 53 63 | and Com|puter Sc|
|00000710| 69 65 6e 63 65 0a 20 20 | 20 20 5c 2f 5f 2f 20 20 |ience. | \/_/ |
|00000720| 20 20 55 6e 69 76 65 72 | 73 69 74 79 20 6f 66 20 | Univer|sity of |
|00000730| 5a 61 67 72 65 62 2c 20 | 43 72 6f 61 74 69 61 0a |Zagreb, |Croatia.|
|00000740| 0a 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000750| 20 20 20 20 54 6f 75 63 | 68 20 69 66 20 79 6f 75 | Touc|h if you|
|00000760| 20 6d 75 73 74 2c 20 50 | 61 79 20 75 70 20 69 66 | must, P|ay up if|
|00000770| 20 79 6f 75 20 62 75 73 | 74 2e 0a | you bus|t.. |
+--------+-------------------------+-------------------------+--------+--------+